//
//  Home_ZP_01CollectionViewCell.m
//  MagicBox
//
//  Created by dllo on 16/8/10.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Home_ZP_01CollectionViewCell.h"
#import "HomePage.h"
@interface Home_ZP_01CollectionViewCell()
@property (nonatomic, retain) UILabel *title;
@property (nonatomic, retain) UIImageView *logoImage;

@end

@implementation Home_ZP_01CollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.title = [[UILabel alloc]init];
        [self.contentView addSubview:_title];
        
        self.logoImage = [[UIImageView alloc]init];
        [self.contentView addSubview:_logoImage];
        
        
        
    }
    return self;
}


-(void)layoutSubviews{
    [super layoutSubviews];
    self.title.frame = CGRectMake(0,self.contentView.frame.size.height/4*3, self.contentView.frame.size.width, self.contentView.frame.size.height/4);
    self.title.textAlignment = 1;
    self.logoImage.frame = CGRectMake(self.contentView.frame.size.height/4, self.frame.size.height/4, self.contentView.frame.size.width/4*2, self.contentView.frame.size.height/4*2);
   self.title.font = [UIFont boldSystemFontOfSize:12];
}

-(void)setImageStr:(NSString *)imageStr{
    _imageStr = imageStr;
    self.logoImage.image = [UIImage imageNamed:_imageStr];

}



-(void)setModel:(HomePage *)model{
    _model = model;
    self.title.text = _model.title;
    
}









@end
